package com.xyzk.diagnose.activity.adapter;

import java.util.ArrayList;

import com.xyzk.diagnose.R;
import com.xyzk.diagnose.TApplication;

import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

public class CartypeAdapter extends BaseAdapter{

	public CartypeAdapter(ArrayList<String> datas) {
		super(datas);
	}

	@Override
	public View getView(int position, View view, ViewGroup parent) {
		ViewHolder vh;
		if(view == null){
			view = View.inflate(TApplication.getContext(),R.layout.activity_cartype_item,null);
			vh = new ViewHolder();
			vh.textView = (TextView) view.findViewById(R.id.tv_cartype_item);
			view.setTag(vh);
		}else{
			vh = (ViewHolder) view.getTag();
		}
		vh.textView.setText(getItem(position));
		return view;
	}

	class ViewHolder{
		TextView textView;
	}
}
